﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities;

namespace HCD.Entities
{
    /// <summary>
    /// 血糖记录表
    /// </summary>
    [Table("HIS_GLUCOSE_REC")]
    public class HisGlucoseRec : Entity<long>
    {
        /// <summary>
        /// 病人标识
        /// </summary>
        [Column("PATIENT_ID", TypeName = "VARCHAR(20)"),Required]
        public string PatientId { get; set; }



        /// <summary>
        /// 就诊标识(住院VisitId门诊ClinicNo)
        /// </summary>
        [Column("VISIT_ID", TypeName = "VARCHAR(20)"), Required]
        public string VisitId { get; set; }



        /// <summary>
        /// 记录日期
        /// </summary>
        [Column("RECORDING_DATE", TypeName = "DATE")]
        public DateTime RecordingDate { get; set; }

        /// <summary>
        /// 记录时间点
        /// </summary>
        [Column("TIME_POINT", TypeName = "DATETIME")]
        public DateTime TimePoint { get; set; }


        /// <summary>
        /// 空腹、餐前、餐后、随机
        /// </summary>
        [Column("GLUCOSE_ITEM_NAME", TypeName = "VARCHAR(60)"), Required]
        public string GlucoseItemName { get; set; }



        /// <summary>
        /// 血糖值
        /// </summary>
        [Column("GLUCOSE_VALUE", TypeName = "DECIMAL(3,1)")]
        public decimal GlucoseValue { get; set; }



        /// <summary>
        /// 备注
        /// </summary>
        [Column("MEMO", TypeName = "VARCHAR(100)")]
        public string Memo { get; set; }



        /// <summary>
        /// 创建人
        /// </summary>
        [Column("CREATED_BY", TypeName = "VARCHAR(20)"), Required]
        public string CreatedBy { get; set; }



        /// <summary>
        /// 创建人姓名
        /// </summary>
        [Column("CREATED_BY_NAME", TypeName = "VARCHAR(20)"), Required]
        public string CreatedByName { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("CREATED_TIME", TypeName = "DATETIME")]
        public DateTime CreatedTime { get; set; }
    }
}
